Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drain state implementation #9

Merged
merged 3 commits into from
Aug 22, 2024
Merged

Conversation

adrianchiris
Copy link
Collaborator

Refer to individual commits for context.

@coveralls
Copy link

coveralls commented Aug 18, 2024

Pull Request Test Coverage Report for Build 10493988690

Details

  • 264 of 358 (73.74%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+4.8%) to 65.209%

Changes Missing Coverage Covered Lines Changed/Added Lines %
api/v1alpha1/utils.go 12 14 85.71%
cmd/maintenance-manager/main.go 0 2 0.0%
internal/drain/manager.go 46 50 92.0%
internal/drain/request.go 147 171 85.96%
internal/controller/nodemaintenance_controller.go 59 121 48.76%
Totals Coverage Status
Change from base Build 10491048005: 4.8%
Covered Lines: 999
Relevant Lines: 1532

💛 - Coveralls

.mockery.yaml Outdated Show resolved Hide resolved
internal/drain/request.go Outdated Show resolved Hide resolved
Define Interfaces and provide implementations
for draining.

Two Interfaces defined:

1. DrainRequest interface represents a single drain
   request, it provides start/stop/status of the request
   eventually driving drain kubectl API

2. Manager interface manages DrainRequests

Signed-off-by: adrianc <[email protected]>
implement handling of drain state.

- add handler function for drain state
- use drain manager to handle drain requests
- handle NodeMaintenance updates/deletion during drain
- extend controller test to cover draining state

Signed-off-by: adrianc <[email protected]>
Copy link
Collaborator

@ykulazhenkov ykulazhenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ykulazhenkov ykulazhenkov merged commit 61d1ad3 into Mellanox:main Aug 22, 2024
8 checks passed
@adrianchiris adrianchiris deleted the add-drain branch January 9, 2025 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants